<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\common\model;

/**
 * Description of LogModel
 *
 * @author DevPHP
 */
class LogModel {

    // 建议分库或者保持到mongodb
    public static function logLogin($login_id, $ip, $message, $login_status = false, $is_login = 1) {
        $data = [
            'login_id' => $login_id,
            'is_login' => $is_login,
            'login_ip' => $ip,
            'login_time' => date('Y-m-d H:i:s'),
            'remark' => $message,
            'status' => $login_status ? 1 : 0,
        ];
        db('user_login_log')->insert($data);
    }

}
